<div class="clear">
<div class="right"><%= link_to "new match",new_admin_match_path %></div>
</div>

<div>
<% form_tag admin_matches_path,:method=>:get do |f| %>
  Home team name: <%= text_field_tag :name,params[:name] %>
  Played?
  <%= check_box_tag "played",'on',params[:played] %>
  <%= submit_tag "Search",:class=>"button" %>
<% end %>
</div>


<table class="lister">
<thead>
<tr>
<td width="5%">id</td>
<td width="30%">home team</td>
<td width="30%">away team</td>
<td width="15%">status</td>
<td width="20%">manage</td>
</tr>
</thead>
<tbody>
<% if @matches.empty? %>
<tr><td colspan="5"><div class="empty"> no matches found. </div></td></tr>
<% else %>
<tr><td colspan="5">next match</td></tr>
<%= render :partial=>"match_tr",:object=>@next_match %>
<tr><td colspan="5">&nbsp;</td></tr>
<%= render :partial=>"match_tr",:collection=>@matches %>
<% end %>
</tbody>
</table>
<%= page_links %>


